package com.ev.asl.service.impl;

import com.ev.asl.constant.AslConstant;
import com.ev.asl.dao.AslBarCodeDao;
import com.ev.asl.dao.AslComplaintDao;
import com.ev.asl.domain.AslBarCodeDO;
import com.ev.asl.domain.AslBarCodeTrayDO;
import com.ev.asl.domain.AslComplaintsDO;
import com.ev.asl.dto.AslBarCodeParam;
import com.ev.asl.dto.AslBarCodeTrayParam;
import com.ev.asl.service.AslBarCodeService;
import com.ev.asl.service.AslComplaintService;
import com.ev.asl.vo.AslBarCodeVO;
import com.ev.framework.utils.HttpClientUtils;
import com.ev.framework.utils.R;
import com.ev.k3cloudBusiness.vo.K3DeeSyncVO;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;

import java.util.*;
import java.util.stream.Collectors;

/**
 * 客诉信息
 */
@Slf4j
@Service
public class AslComplaintServiceImpl implements AslComplaintService {

    @Autowired
    private AslComplaintDao aslComplaintDao;


    @Override
    public AslComplaintsDO get(Long id) {
        return aslComplaintDao.get(id);
    }

    @Override
    public List<AslComplaintsDO> list(AslComplaintsDO aslComplaintsDO) {
        return aslComplaintDao.listComplaints(aslComplaintsDO);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public Integer batchDeleteTray(List<Long> ids) {
        return aslComplaintDao.batchDeleteTray(ids);
    }


    @Override
    @Transactional(rollbackFor = Exception.class)
    public int update(AslComplaintsDO aslBarCodeDO) {
        return aslComplaintDao.update(aslBarCodeDO);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public int save(AslComplaintsDO aslBarCodeDO) {
        return aslComplaintDao.save(aslBarCodeDO);
    }

    @Override
    public Integer count(AslComplaintsDO aslComplaintsDO) {
        return aslComplaintDao.count(aslComplaintsDO);
    }

}
